#!/usr/bin/env python

import os
import sys
from distutils.core import setup
from distutils.command.bdist_dumb import bdist_dumb

sys.path.insert(0, "src")
import rwb

class custom_bdist_dumb(bdist_dumb):
    def reinitialize_command(self, name, **kw):
        print "reinitialize_command..."
        cmd = bdist_dumb.reinitialize_command(self, name, **kw)
        print "name:", name
        if name == 'install':
            cmd.install_lib = '/'
        return cmd

setup(name             = 'robotframework-workbench',
      cmdclass         = {'bdist_dumb': custom_bdist_dumb},
      version          = rwb.__version__,
      description      = 'RWB :: Robot Framework Workbench',
      long_description = open(os.path.join(os.path.dirname(__file__),"README.txt")).read(),
      author           = 'Bryan Oakley',
      author_email     = 'bryan.oakley@orbitz.com',
      url              = 'http://code.google.com/p/robotframework-workbench/',
      keywords         = 'robotframework testing testautomation',
      platforms        = 'any',
      classifiers      = [
        "Development Status :: 2 - Pre-Alpha",
        "License :: OSI Approved :: Apache Software License",
        "Operating System :: OS Independent",
        "Programming Language :: Python",
        "Topic :: Software Development :: Testing",
        "Topic :: Software Development :: Quality Assurance",
        "Intended Audience :: Developers",
        ],
      package_dir      = {"": "src",
                          'rwb':       'src/rwb', 
                          'rsa':       'src/rsa',
                          'dtc':       'src/dtc', 
                          'firebrick': 'src/firebrick',
                          'robot':     'src/robot',
                          },
      packages         = ['dtc','firebrick',
                          'rwb', 'rwb.plugins', 'rwb.widgets', 
                          'robot', 'robot.common', 'robot.utils',
                          'robot.conf','robot.libraries', 'robot.serializing',
                          'robot.variables','robot.running','robot.output',
                          'robot.parsing',
                          'rsa', 'rsa.util','rsa.loader','rsa.rulesets'],
      py_modules       = ['configobj', '__main__', 'rwb.robotfilter'],
      scripts          = ["src/bin/rwb"],
      )
